# frozen_string_literal: true

namespace '/auth' do
  helpers ApiHelpers
  before { inject_params }
  post '/login' do
    puts @json_params
    Member.verify(@json_params)
  end

  get '/get_info' do
    admin = {
      name: 'admin',
      user_id: '2',
      access: ['admin'],
      token: 'admin',
      avatar: 'https://file.iviewui.com/dist/a0e88e83800f138b94d2414621bd9704.png'
    }
    admin.to_json
  end

  post '/save_error_logger' do
    puts params
  end
end
